package com.share.shareplatform.common.state;

public enum OrderState {
    ALL("所有订单"),
    WAITING_FOR_PAYMENT("待付款"),WAITING_FOR_SENDING("待发货"),
    WAITING_FOR_GOODS("待收货"),USING("已签收"),WAITING_FOR_RETURN("已归还"),HAS_RETURNED("已购买"),NO_STORAGE("库存不足");

    private String state;

    public static boolean search(String state){
        for(OrderState orderState:OrderState.values()){
            if(orderState.getState().equals(state)){
                return true;
            }
        }
        return false;
    }

    OrderState(String state){
        this.state=state;
    }

    public String getState() {
        return state;
    }

}
